﻿//生成[BlogPosts]Repository代码
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FineAdmin.IRepository;
using FineAdmin.Model;
using Dapper;

namespace FineAdmin.Repository
{
    public class BlogPostsRepository : BaseRepository<BlogPostsModel>, IBlogPostsRepository
    {
        public IEnumerable<BlogPostsModel> GetBlogPostsList()
        {
            using (var conn = SqlHelper.SqlConnection())
            {
                string sql = @"SELECT  * FROM BlogPosts ORDER BY SortCode ASC";
                return conn.Query<BlogPostsModel>(sql);
            }
        }
    }
}